﻿@model IEnumerable<SachVietDLL.BookDetail>

@{
    ViewBag.Title = "Index";
}

<h2>Index</h2>

<p>
    @Html.ActionLink("Create New", "Create")
</p>
<table>
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.book_ID)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.book_Title)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.book_Description)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.book_Price)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.book_Old_Price)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Publisher.publisher_Name)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.publication_Date)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Book_Category.book_Category_Description)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.image)
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.book_ID)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.book_Title)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.book_Description)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.book_Price)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.book_Old_Price)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Publisher.publisher_Name)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.publication_Date)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Book_Category.book_Category_Description)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.image)
        </td>
        <td>
            @Html.ActionLink("Edit", "Edit", new {  id=item.book_ID }) |
            @Html.ActionLink("Details", "Details", new { id=item.book_ID }) |
            @Html.ActionLink("Delete", "Delete", new { id=item.book_ID }) 
        </td>
    </tr>
}

</table>
